// 添加优先级常量配置
export const PRIORITY_CONFIG = {
  P0: {
    value: 0,
    label: 'P0',
    color: 'rgb(var(--danger-6))', // 红色，最紧急
    description: '紧急'
  },
  P1: {
    value: 1,
    label: 'P1',
    color: 'rgb(var(--warning-6))', // 橙色，次紧急
    description: '重要'
  },
  P2: {
    value: 2,
    label: 'P2',
    color: 'rgb(var(--primary-6))', // 蓝色，普通
    description: '一般'
  }
}

// 获取优先级颜色的函数
export const getTaskPriorityColor = (priority: any) => {
  switch (priority) {
    case PRIORITY_CONFIG.P0.value:
      return PRIORITY_CONFIG.P0.color
    case PRIORITY_CONFIG.P1.value:
      return PRIORITY_CONFIG.P1.color
    case PRIORITY_CONFIG.P2.value:
      return PRIORITY_CONFIG.P2.color
    default:
      return 'var(--color-text-3)'
  }
}
// 获取优先级文本的函数
export const getPriorityLabel = (priority: any) => {
  switch (priority) {
    case PRIORITY_CONFIG.P0.value:
      return PRIORITY_CONFIG.P0.label
    case PRIORITY_CONFIG.P1.value:
      return PRIORITY_CONFIG.P1.label
    case PRIORITY_CONFIG.P2.value:
      return PRIORITY_CONFIG.P2.label
    default:
      return '-'
  }
}
